aboutusesTILblog

Today I learned about...
web api

Back to all tags

web api14.07.2019

Don't use the unload event!

The unload event that is available to us web developers isn’t consistent across browsers (but we already know that many things arent πŸ˜‚). Really, if you want to have predictable behavior and need to fire off some event/code when a user leaves/closes your page, you should be listening to a page visbility change.

Check it out